namespace WhoCanHelpMe.Web.Controllers.Profile.Mappers
{
    #region Using Directives

    using Contracts;

    using Domain;

    using ViewModels;

    #endregion

    public class AddAssertionDetailsMapper : IAddAssertionDetailsMapper
    {
        public AddAssertionDetails MapFrom(
            AddAssertionFormViewModel viewModel,
            Identity identity)
        {
            return new AddAssertionDetails
                {
                    CategoryId = viewModel.CategoryId,
                    TagName = viewModel.TagName,
                    UserName = identity.UserName
                };
        }
    }
}